package fon.rm2.client;

import fon.rm2.client.R;
import fon.rm2.client.sms.SMSActivity;
import fon.rm2.client.socket.SocketActivity;
import fon.rm2.client.wifi.WiFiActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class Rm2AtmClient extends Activity {
	
	@SuppressWarnings("unused")
	private static final String TAG = "Rm2Atm";
	
	private Button btnStartWifiActivity = null;
	private Button btnStartSocketActivity = null;
	private Button btnStartSMSActivity = null;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	try
    	{ 
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.main);
	        
	        btnStartWifiActivity = (Button) findViewById(R.id.btnStartWifiActivity);
	        btnStartWifiActivity.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View view) {
					Intent startWifiActivity = new Intent(Rm2AtmClient.this, WiFiActivity.class);
					startActivity(startWifiActivity);
				}
	        });
	        
	        btnStartSocketActivity = (Button) findViewById(R.id.btnStartSocketActivity);
	        btnStartSocketActivity.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View view) {
					Intent startSocketActivity = new Intent(Rm2AtmClient.this, SocketActivity.class);
					startActivity(startSocketActivity);
				}
	        });
	        
	        btnStartSMSActivity = (Button) findViewById(R.id.btnStartSMSActivity);
	        btnStartSMSActivity.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View view) {
					Intent startSMSActivity = new Intent(Rm2AtmClient.this, SMSActivity.class);
					startActivity(startSMSActivity);
				}
	        });
    	}
    	catch(Exception ex)
    	{
    		Toast.makeText(this, ex.getMessage(), Toast.LENGTH_LONG).show();
    	}
    }
}